create a sorted linked list